package com.link.base.base.member.service;

import com.link.base.base.member.model.MchMpPay;
import com.link.base.base.member.model.MpMember;
import com.link.base.base.member.model.MpWeixinPay;
import com.link.core.basic.service.BasicService;

import javax.servlet.http.HttpServletRequest;
import java.util.Map;

/**
 * 会员
 *
 * @author: 路江
 * @date 2018-10-22
 */
public interface MpMemberService extends BasicService<MpMember> {

    /**
     * 统一下单
     * @param mpWeixinPay
     * @param request
     * @return
     * @throws Exception
     */
    Map<String,Object> orderMpPay(MpWeixinPay mpWeixinPay, HttpServletRequest request) throws  Exception;

    /**
     * 支付后流水记录
     * @param map
     * @throws Exception
     */
    void orderPayUpdate(Map map) throws  Exception;

    /**
     * 生成签名
     * @param map
     * @return
     * @throws Exception
     */
    String createSign(Map map) throws  Exception;

    /**
     *  企业支付
     * @param mchMpPay
     * @param request
     * @return
     * @throws Exception
     */
    Map<String,Object> mchMpPay(MchMpPay mchMpPay, HttpServletRequest request) throws  Exception;

    /**
     * 查询企业支付结果
     * @param mchMpPay
     * @param request
     * @return
     * @throws Exception
     */
    Map<String,Object> queryPayResult(MchMpPay mchMpPay, HttpServletRequest request) throws  Exception;

    /***
     * 抢红包
     * 并发处理
     *
     * @param mchMpPay
     * @param request 当前请求对象
     * @return Map
     * @throws Exception
     */
    public Map<String, Object> concurrentMchMpPay(MchMpPay mchMpPay,HttpServletRequest request) throws Exception;

    /***
     * 查询会员信息
     *  wangdawei
     * @param id
     * @return Map
     * @throws Exception
     */
    public Map<String, Object> queryMemInfo(Long id) throws Exception;

}
